﻿using System;
using System.Collections.Generic;

namespace CodeCounsel.SharePoint2010.DigiD
{
    class VerifyWebResponse
        : WebResponse
    {
        public string UserID { get { return Parameters[Schema.UserID]; } }

        public SecurityLevel SecurityLevel 
        { 
            get 
            {
                int securityLevel;
                if (Int32.TryParse(Parameters[Schema.SecurityLevel], out securityLevel))
                {
                    return (SecurityLevel)securityLevel;
                }
                throw new DigiDException("Unexpected security level format");
            } 
        }

        public VerifyWebResponse(Dictionary<string, string> parameters)
            : base(parameters)
        {
        }

        
    }
}
